package main

import (
	"fmt"
	"github.com/spf13/cobra"
)

var tt bool
func printCobraFlag() {
	cmd :=cobra.Command{
		Use:"at",
	}
	cmd.PersistentFlags().BoolVarP(&tt,"test","t",false ,"测试布尔值")
	cmd.Execute()
	fmt.Printf("test bool:%v", tt)
}